<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>Class: MyAnalysis</title>
    
    
    
    
    
    <meta property="og:title" content=""/>
    <meta property="og:type" content="website"/>
    <meta property="og:image" content=""/>
    
    <meta property="og:url" content=""/>
    
    <script src="scripts/prettify/prettify.js"></script>
    <script src="scripts/prettify/lang-css.js"></script>
    <script src="scripts/jquery.min.js"></script>
    <!--[if lt IE 9]>
      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
    <link type="text/css" rel="stylesheet" href="styles/bootstrap.min.css">
    <link type="text/css" rel="stylesheet" href="styles/jaguar.css">
    
    
    <script>
    var config = {"monospaceLinks":false,"cleverLinks":false,"applicationName":"Jalangi 2","disqus":"","googleAnalytics":"","openGraph":{"title":"","type":"website","image":"","site_name":"","url":""},"meta":{"title":"","description":"","keyword":""},"linenums":true,"default":{}};
    </script>
    

    
</head>
<body>
<div id="wrap" class="clearfix">
    
<div class="navigation">
    <h3 class="applicationName"><a href="index.html">Jalangi 2</a></h3>

    <div class="search">
        <input id="search" type="text" class="form-control input-sm" placeholder="Search Documentations">
    </div>
    <ul class="list">
    
        <li class="item" data-name="MyAnalysis">
            <span class="title">
                <a href="MyAnalysis.html">MyAnalysis</a>
                
            </span>
            <ul class="members itemMembers">
            
            </ul>
            <ul class="typedefs itemMembers">
            
            </ul>
            <ul class="methods itemMembers">
            
            <span class="subtitle">Methods</span>
            
                <li data-name="MyAnalysis#_return"><a href="MyAnalysis.html#_return">_return</a></li>
            
                <li data-name="MyAnalysis#_throw"><a href="MyAnalysis.html#_throw">_throw</a></li>
            
                <li data-name="MyAnalysis#_with"><a href="MyAnalysis.html#_with">_with</a></li>
            
                <li data-name="MyAnalysis#binary"><a href="MyAnalysis.html#binary">binary</a></li>
            
                <li data-name="MyAnalysis#binaryPre"><a href="MyAnalysis.html#binaryPre">binaryPre</a></li>
            
                <li data-name="MyAnalysis#conditional"><a href="MyAnalysis.html#conditional">conditional</a></li>
            
                <li data-name="MyAnalysis#declare"><a href="MyAnalysis.html#declare">declare</a></li>
            
                <li data-name="MyAnalysis#endExecution"><a href="MyAnalysis.html#endExecution">endExecution</a></li>
            
                <li data-name="MyAnalysis#endExpression"><a href="MyAnalysis.html#endExpression">endExpression</a></li>
            
                <li data-name="MyAnalysis#forinObject"><a href="MyAnalysis.html#forinObject">forinObject</a></li>
            
                <li data-name="MyAnalysis#functionEnter"><a href="MyAnalysis.html#functionEnter">functionEnter</a></li>
            
                <li data-name="MyAnalysis#functionExit"><a href="MyAnalysis.html#functionExit">functionExit</a></li>
            
                <li data-name="MyAnalysis#getField"><a href="MyAnalysis.html#getField">getField</a></li>
            
                <li data-name="MyAnalysis#getFieldPre"><a href="MyAnalysis.html#getFieldPre">getFieldPre</a></li>
            
                <li data-name="MyAnalysis#instrumentCode"><a href="MyAnalysis.html#instrumentCode">instrumentCode</a></li>
            
                <li data-name="MyAnalysis#instrumentCodePre"><a href="MyAnalysis.html#instrumentCodePre">instrumentCodePre</a></li>
            
                <li data-name="MyAnalysis#invokeFun"><a href="MyAnalysis.html#invokeFun">invokeFun</a></li>
            
                <li data-name="MyAnalysis#invokeFunPre"><a href="MyAnalysis.html#invokeFunPre">invokeFunPre</a></li>
            
                <li data-name="MyAnalysis#literal"><a href="MyAnalysis.html#literal">literal</a></li>
            
                <li data-name="MyAnalysis#onReady"><a href="MyAnalysis.html#onReady">onReady</a></li>
            
                <li data-name="MyAnalysis#putField"><a href="MyAnalysis.html#putField">putField</a></li>
            
                <li data-name="MyAnalysis#putFieldPre"><a href="MyAnalysis.html#putFieldPre">putFieldPre</a></li>
            
                <li data-name="MyAnalysis#read"><a href="MyAnalysis.html#read">read</a></li>
            
                <li data-name="MyAnalysis#runInstrumentedFunctionBody"><a href="MyAnalysis.html#runInstrumentedFunctionBody">runInstrumentedFunctionBody</a></li>
            
                <li data-name="MyAnalysis#scriptEnter"><a href="MyAnalysis.html#scriptEnter">scriptEnter</a></li>
            
                <li data-name="MyAnalysis#scriptExit"><a href="MyAnalysis.html#scriptExit">scriptExit</a></li>
            
                <li data-name="MyAnalysis#unary"><a href="MyAnalysis.html#unary">unary</a></li>
            
                <li data-name="MyAnalysis#unaryPre"><a href="MyAnalysis.html#unaryPre">unaryPre</a></li>
            
                <li data-name="MyAnalysis#write"><a href="MyAnalysis.html#write">write</a></li>
            
            </ul>
            <ul class="events itemMembers">
            
            </ul>
        </li>
    
    </ul>
</div>
    <div class="main">
        <h1 class="page-title" data-filename="MyAnalysis.html">Class: MyAnalysis</h1>
        



<section>
    
<header>
    <h2>
    MyAnalysis
    </h2>
    
</header>  

<article>
    <div class="container-overview">
    
    
    
        
<dt>
    <div class="nameContainer">
        <h4 class="name" id="MyAnalysis">
            
            new MyAnalysis<span class="signature">()</span>
        </h4>
    
        
        <div class="tag-source">
            /Users/ksen/Dropbox/jalangi2/src/js/runtime/analysisCallbackTemplate.js, line 101
        </div>
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>
    This file is a template for writing a custom Jalangi 2 analysis.  Simply copy this file and rewrite the
    callbacks that you need to implement in your analysis.  Other callbacks should be removed from the file.
</p>

<p>
    In the following methods (also called as callbacks) one can choose to not return anything.
    If all of the callbacks return nothing, we get a passive analysis where the
    concrete execution happens unmodified and callbacks can be used to observe the execution.
    One can choose to return suitable objects with specified properties in some callbacks
    to modify the behavior of the concrete execution.  For example, one could set the skip
    property of the object returned from <a href="MyAnalysis.html#putFieldPre">MyAnalysis#putFieldPre</a> to true to skip the actual putField operation.
    Similarly, one could set the result field of the object returned from a <a href="MyAnalysis.html#write">MyAnalysis#write</a> callback
    to modify the value that is actually written to a variable. The result field of the object
    returned from a <a href="MyAnalysis.html#conditional">MyAnalysis#conditional</a> callback can be suitably set to change the control-flow of the
    program execution.  In <a href="MyAnalysis.html#functionExit">MyAnalysis#functionExit</a> and <a href="MyAnalysis.html#scriptExit">MyAnalysis#scriptExit</a>,
    one can set the <tt>isBacktrack</tt> property of the returned object to true to reexecute the body of
    the function from the beginning.  This in conjunction with the ability to change the
    control-flow of a program enables us to explore the different paths of a function in
    symbolic execution.
</p>

<p>
    Note that if <tt>process.exit()</tt> is called, then an execution terminates abnormally and a callback to
    <a href="MyAnalysis.html#endExecution">MyAnalysis#endExecution</a> will be skipped.
</p>

<p>
    An analysis can access the source map, which maps instruction identifiers to source locations,
    using the global object stored in <code>J$.smap</code>.  Jalangi 2
    assigns a unique id, called <code>sid</code>, to each JavaScript
    script loaded at runtime.  <code>J$.smap</code> maps each <code>sid</code> to an object, say
    <code>iids</code>, containing source map information for the script whose id is <code>sid</code>.
    <code>iids</code> has the following properties: <code>"originalCodeFileName"</code> (stores the path of the original
    script file), <code>"instrumentedCodeFileName"</code> (stores the path of the instrumented script file),
    <code>"url"</code> (is optional and stores the URL of the script if it is set during instrumentation
    using the --url option),
    <code>"evalSid"</code> (stores the sid of the script in which the eval is called in case the current script comes from
    an <code>eval</code> function call),
    <code>"evalIid"</code> (iid of the <code>eval</code> function call in case the current script comes from an
    <code>eval</code> function call), <code>"nBranches"</code> (the number of conditional statements
    in the script),
    and <code>"code"</code> (a string denoting the original script code if the code is instrumented with the
    --inlineSource option).
    <code>iids</code> also maps each <code>iid</code> (which stands for instruction id, an unique id assigned
    to each callback function inserted by Jalangi2) to an array containing
    <code>[beginLineNumber, beginColumnNumber, endLineNumber, endColumnNumber]</code>.  The mapping from iids
    to arrays is only available if the code is instrumented with
    the --inlineIID option.
</p>
<p>
    In each callback described below, <code>iid</code> denotes the unique static instruction id of the callback in the script.
    Two callback functions inserted in two different scripts may have the same iid.  In a callback function, one can access
    the current script id using <code>J$.sid</code>.  One can call <code>J$.getGlobalIID(iid)</code> to get a string, called
    <code>giid</code>, that statically identifies the
    callback throughout the program.  <code>J$.getGlobalIID(iid)</code> returns the string <code>J$.sid+":"+iid</code>.
    <code>J$.iidToLocation(giid)</code> returns a string
    containing the original script file path, begin and end line numbers and column numbers of the code snippet
    for which the callback with <code>giid</code> was inserted.

</p>
<p>
    A number of sample analyses can be found at ../src/js/sample_analyses/.  Refer to ../README.md for instructions
    on running an analysis.
</p>
    </div>
    

    
    
    
    
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    
    
</dd>

    
    </div>
    
    
    
    
    
    
    
    
    
    
    
    
    
    
        <h3 class="subsection-title">Methods</h3>
        
        <dl>
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="_return">
            
            _return<span class="signature">(iid, val)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Object|undefined}</span>
        </h4>
    
        
        <div class="tag-source">
            /Users/ksen/Dropbox/jalangi2/src/js/runtime/analysisCallbackTemplate.js, line 385
        </div>
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        This callback is called before a value is returned from a function using the <tt>return</tt> keyword.
    </div>
    

    
    
    
    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>iid</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>
            
            
            
            <td class="description last">
                
                Static unique instruction identifier of this callback</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>val</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>
            
            
            
            <td class="description last">
                
                Value to be returned</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Object
                         | 
                    
                        undefined
                        
                    
            </td>
            <td class="description last">- If an object is returned, the value to be returned is
replaced with the value stored in the <tt>result</tt> property of the object.</td>
        </tr>
    
    </tbody>
</table>

    
    
    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="_throw">
            
            _throw<span class="signature">(iid, val)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Object|undefined}</span>
        </h4>
    
        
        <div class="tag-source">
            /Users/ksen/Dropbox/jalangi2/src/js/runtime/analysisCallbackTemplate.js, line 397
        </div>
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        This callback is called before a value is thrown using the <tt>throw</tt> keyword.
    </div>
    

    
    
    
    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>iid</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>
            
            
            
            <td class="description last">
                
                Static unique instruction identifier of this callback</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>val</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>
            
            
            
            <td class="description last">
                
                Value to be thrown</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Object
                         | 
                    
                        undefined
                        
                    
            </td>
            <td class="description last">- If an object is returned, the value to be thrown is
replaced with the value stored in the <tt>result</tt> property of the object.</td>
        </tr>
    
    </tbody>
</table>

    
    
    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="_with">
            
            _with<span class="signature">(iid, val)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Object|undefined}</span>
        </h4>
    
        
        <div class="tag-source">
            /Users/ksen/Dropbox/jalangi2/src/js/runtime/analysisCallbackTemplate.js, line 409
        </div>
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        This callback is called when a <tt>with</tt> statement is executed
    </div>
    

    
    
    
    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>iid</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>
            
            
            
            <td class="description last">
                
                Static unique instruction identifier of this callback</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>val</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>
            
            
            
            <td class="description last">
                
                Value used as an argument to <tt>with</tt></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Object
                         | 
                    
                        undefined
                        
                    
            </td>
            <td class="description last">- If an object is returned, the value to be used in <tt>with</tt> is
replaced with the value stored in the <tt>result</tt> property of the object.</td>
        </tr>
    
    </tbody>
</table>

    
    
    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="binary">
            
            binary<span class="signature">(iid, op, left, right, result, isOpAssign, isSwitchCaseComparison, isComputed)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Object|undefined}</span>
        </h4>
    
        
        <div class="tag-source">
            /Users/ksen/Dropbox/jalangi2/src/js/runtime/analysisCallbackTemplate.js, line 513
        </div>
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        This callback is called after a binary operation. Binary operations include  +, -, *, /, %, &, |, ^,
<<, >>, >>>, <, >, <=, >=, ==, !=, ===, !==, instanceof, delete, in.
    </div>
    

    
    
    
    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>iid</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>
            
            
            
            <td class="description last">
                
                Static unique instruction identifier of this callback</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>op</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>
            
            
            
            <td class="description last">
                
                Operation to be performed</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>left</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>
            
            
            
            <td class="description last">
                
                Left operand</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>right</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>
            
            
            
            <td class="description last">
                
                Right operand</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>result</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>
            
            
            
            <td class="description last">
                
                The result of the binary operation</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>isOpAssign</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">boolean</span>


            
            </td>
            
            
            
            <td class="description last">
                
                True if the binary operation is part of an expression of the form
<code>x op= e</code></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>isSwitchCaseComparison</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">boolean</span>


            
            </td>
            
            
            
            <td class="description last">
                
                True if the binary operation is part of comparing the discriminant
with a consequent in a switch statement.</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>isComputed</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">boolean</span>


            
            </td>
            
            
            
            <td class="description last">
                
                True if the operation is of the form <code>delete x[p]</code>, and false
otherwise (even if the operation if of the form <code>delete x.p</code>)</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Object
                         | 
                    
                        undefined
                        
                    
            </td>
            <td class="description last">- If an object is returned, the result of the binary operation is
replaced with the value stored in the <tt>result</tt> property of the object.</td>
        </tr>
    
    </tbody>
</table>

    
    
    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="binaryPre">
            
            binaryPre<span class="signature">(iid, op, left, right, isOpAssign, isSwitchCaseComparison, isComputed)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Object|undefined}</span>
        </h4>
    
        
        <div class="tag-source">
            /Users/ksen/Dropbox/jalangi2/src/js/runtime/analysisCallbackTemplate.js, line 491
        </div>
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        This callback is called before a binary operation. Binary operations include  +, -, *, /, %, &, |, ^,
<<, >>, >>>, <, >, <=, >=, ==, !=, ===, !==, instanceof, delete, in.  No callback for <code>delete x</code>
because this operation cannot be performed reflectively.
    </div>
    

    
    
    
    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>iid</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>
            
            
            
            <td class="description last">
                
                Static unique instruction identifier of this callback</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>op</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>
            
            
            
            <td class="description last">
                
                Operation to be performed</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>left</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>
            
            
            
            <td class="description last">
                
                Left operand</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>right</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>
            
            
            
            <td class="description last">
                
                Right operand</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>isOpAssign</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">boolean</span>


            
            </td>
            
            
            
            <td class="description last">
                
                True if the binary operation is part of an expression of the form
<code>x op= e</code></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>isSwitchCaseComparison</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">boolean</span>


            
            </td>
            
            
            
            <td class="description last">
                
                True if the binary operation is part of comparing the discriminant
with a consequent in a switch statement.</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>isComputed</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">boolean</span>


            
            </td>
            
            
            
            <td class="description last">
                
                True if the operation is of the form <code>delete x[p]</code>, and false
otherwise (even if the operation if of the form <code>delete x.p</code>)</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Object
                         | 
                    
                        undefined
                        
                    
            </td>
            <td class="description last">- If an object is returned and the
<tt>skip</tt> property is true, then the binary operation is skipped.  Original <tt>op</tt>, <tt>left</tt>,
and <tt>right</tt> are replaced with that from the returned object if an object is returned.</td>
        </tr>
    
    </tbody>
</table>

    
    
    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="conditional">
            
            conditional<span class="signature">(iid, result)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Object|undefined}</span>
        </h4>
    
        
        <div class="tag-source">
            /Users/ksen/Dropbox/jalangi2/src/js/runtime/analysisCallbackTemplate.js, line 555
        </div>
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        This callback is called after a condition check before branching. Branching can happen in various statements
including if-then-else, switch-case, while, for, ||, &&, ?:.
    </div>
    

    
    
    
    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>iid</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>
            
            
            
            <td class="description last">
                
                Static unique instruction identifier of this callback</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>result</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>
            
            
            
            <td class="description last">
                
                The value of the conditional expression</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Object
                         | 
                    
                        undefined
                        
                    
            </td>
            <td class="description last">- If an object is returned, the result of the conditional expression is
replaced with the value stored in the <tt>result</tt> property of the object.</td>
        </tr>
    
    </tbody>
</table>

    
    
    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="declare">
            
            declare<span class="signature">(iid, name, val, isArgument, argumentIndex, isCatchParam)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Object|undefined}</span>
        </h4>
    
        
        <div class="tag-source">
            /Users/ksen/Dropbox/jalangi2/src/js/runtime/analysisCallbackTemplate.js, line 266
        </div>
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        This callback is triggered at the beginning of a scope for every local variable declared in the scope, for
every formal parameter, for every function defined using a function statement, for <tt>arguments</tt>
variable, and for the formal parameter passed in a catch statement.
    </div>
    

    
    
    
    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>iid</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>
            
            
            
            <td class="description last">
                
                Static unique instruction identifier of this callback</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>name</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>
            
            
            
            <td class="description last">
                
                Name of the variable that is declared</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>val</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>
            
            
            
            <td class="description last">
                
                Initial value of the variable that is declared.  Variables can be local variables, function
parameters, catch parameters, <tt>arguments</tt>, or functions defined using function statements.  Variables
declared with <tt>var</tt> have <tt>undefined</tt> as initial values and cannot be changed by returning a
different value from this callback.  On the beginning of an execution of a function, a <tt>declare</tt>
callback is called on the <tt>arguments</tt> variable.</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>isArgument</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">boolean</span>


            
            </td>
            
            
            
            <td class="description last">
                
                True if the variable is <tt>arguments</tt> or a formal parameter.</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>argumentIndex</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>
            
            
            
            <td class="description last">
                
                Index of the argument in the function call.  Indices start from 0.  If the
variable is not a formal parameter, then <tt>argumentIndex</tt> is -1.</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>isCatchParam</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">boolean</span>


            
            </td>
            
            
            
            <td class="description last">
                
                True if the variable is a parameter of a catch statement.</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Object
                         | 
                    
                        undefined
                        
                    
            </td>
            <td class="description last">- If the function returns an object, then the original initial value is
replaced with the value stored in the <tt>result</tt> property of the object.  This does not apply to local
variables declared with <tt>var</tt>.</td>
        </tr>
    
    </tbody>
</table>

    
    
    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="endExecution">
            
            endExecution<span class="signature">()</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{undefined}</span>
        </h4>
    
        
        <div class="tag-source">
            /Users/ksen/Dropbox/jalangi2/src/js/runtime/analysisCallbackTemplate.js, line 601
        </div>
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        This callback is called when an execution terminates in node.js.  In a browser environment, the callback is
called if ChainedAnalyses.js or ChainedAnalysesNoCheck.js is used and Alt-Shift-T is pressed.
    </div>
    

    
    
    
    
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        undefined
                        
                    
            </td>
            <td class="description last">- Any return value is ignored</td>
        </tr>
    
    </tbody>
</table>

    
    
    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="endExpression">
            
            endExpression<span class="signature">(iid)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{undefined}</span>
        </h4>
    
        
        <div class="tag-source">
            /Users/ksen/Dropbox/jalangi2/src/js/runtime/analysisCallbackTemplate.js, line 592
        </div>
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        This callback is called when an expression is evaluated and its value is discarded.  For example, this
callback is called when an expression statement completes its execution.
    </div>
    

    
    
    
    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>iid</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>
            
            
            
            <td class="description last">
                
                Static unique instruction identifier of this callback</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        undefined
                        
                    
            </td>
            <td class="description last">- Any return value is ignored</td>
        </tr>
    
    </tbody>
</table>

    
    
    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="forinObject">
            
            forinObject<span class="signature">(iid, val)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Object|undefined}</span>
        </h4>
    
        
        <div class="tag-source">
            /Users/ksen/Dropbox/jalangi2/src/js/runtime/analysisCallbackTemplate.js, line 241
        </div>
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        This callback is called when a for-in loop is used to iterate the properties of an object.
    </div>
    

    
    
    
    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>iid</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>
            
            
            
            <td class="description last">
                
                Static unique instruction identifier of this callback</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>val</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>
            
            
            
            <td class="description last">
                
                Objects whose properties are iterated in a for-in loop.</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Object
                         | 
                    
                        undefined
                        
                    
            </td>
            <td class="description last">- If the function returns an object, then the original object whose
properties are being iterated is replaced with the value stored in the <tt>result</tt> property of the
returned object.</td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example</h5>
        

    
    <pre class="prettyprint"><code>for (x in y) { }

// the above call roughly gets instrumented as follows:

var aret = analysis.forinObject(iid, y);
if (aret) {
    y = aret.result;
}
for (x in y) {}</code></pre>
    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="functionEnter">
            
            functionEnter<span class="signature">(iid, f, dis, args)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{undefined}</span>
        </h4>
    
        
        <div class="tag-source">
            /Users/ksen/Dropbox/jalangi2/src/js/runtime/analysisCallbackTemplate.js, line 422
        </div>
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        This callback is called before the execution of a function body starts.
    </div>
    

    
    
    
    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>iid</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>
            
            
            
            <td class="description last">
                
                Static unique instruction identifier of this callback</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>f</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
            
            <td class="description last">
                
                The function object whose body is about to get executed</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>dis</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>
            
            
            
            <td class="description last">
                
                The value of the <tt>this</tt> variable in the function body</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>args</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Array</span>


            
            </td>
            
            
            
            <td class="description last">
                
                List of the arguments with which the function is called</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        undefined
                        
                    
            </td>
            <td class="description last">- Any return value is ignored</td>
        </tr>
    
    </tbody>
</table>

    
    
    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="functionExit">
            
            functionExit<span class="signature">(iid, returnVal, wrappedExceptionVal)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Object}</span>
        </h4>
    
        
        <div class="tag-source">
            /Users/ksen/Dropbox/jalangi2/src/js/runtime/analysisCallbackTemplate.js, line 440
        </div>
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        This callback is called when the execution of a function body completes
    </div>
    

    
    
    
    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>iid</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>
            
            
            
            <td class="description last">
                
                Static unique instruction identifier of this callback</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>returnVal</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>
            
            
            
            <td class="description last">
                
                The value returned by the function</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>wrappedExceptionVal</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>
|

<span class="param-type">undefined</span>


            
            </td>
            
            
            
            <td class="description last">
                
                If this parameter is an object, the function
execution has thrown an uncaught exception and the exception is being stored in the <tt>exception</tt>
property of the parameter</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Object
                        
                    
            </td>
            <td class="description last">If an object is returned, then the
actual <tt>returnVal</tt> and <tt>wrappedExceptionVal.exception</tt> are replaced with that from the
returned object. If an object is returned and the property <tt>isBacktrack</tt> is set, then the control-flow
returns to the beginning of the function body instead of returning to the caller.  The property
<tt>isBacktrack</tt> can be set to <tt>true</tt> to repeatedly execute the function body as in MultiSE
symbolic execution.</td>
        </tr>
    
    </tbody>
</table>

    
    
    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="getField">
            
            getField<span class="signature">(iid, base, offset, val, isComputed, isOpAssign, isMethodCall)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Object|undefined}</span>
        </h4>
    
        
        <div class="tag-source">
            /Users/ksen/Dropbox/jalangi2/src/js/runtime/analysisCallbackTemplate.js, line 305
        </div>
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        This callback is called after a property of an object is accessed.
    </div>
    

    
    
    
    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>iid</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>
            
            
            
            <td class="description last">
                
                Static unique instruction identifier of this callback</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>base</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>
            
            
            
            <td class="description last">
                
                Base object</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>offset</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type">*</span>


            
            </td>
            
            
            
            <td class="description last">
                
                Property</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>val</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>
            
            
            
            <td class="description last">
                
                Value of <code>base[offset]</code></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>isComputed</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">boolean</span>


            
            </td>
            
            
            
            <td class="description last">
                
                True if property is accessed using square brackets.  For example,
<tt>isComputed</tt> is <tt>true</tt> if the get field operation is <tt>o[p]</tt>, and <tt>false</tt>
if the get field operation is <tt>o.p</tt></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>isOpAssign</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">boolean</span>


            
            </td>
            
            
            
            <td class="description last">
                
                True if the operation is of the form <code>o.p op= e</code></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>isMethodCall</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">boolean</span>


            
            </td>
            
            
            
            <td class="description last">
                
                True if the get field operation is part of a method call (e.g. <tt>o.p()</tt>)</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Object
                         | 
                    
                        undefined
                        
                    
            </td>
            <td class="description last">- If an object is returned, the value of the get field operation  is
replaced with the value stored in the <tt>result</tt> property of the object.</td>
        </tr>
    
    </tbody>
</table>

    
    
    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="getFieldPre">
            
            getFieldPre<span class="signature">(iid, base, offset, isComputed, isOpAssign, isMethodCall)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Object|undefined}</span>
        </h4>
    
        
        <div class="tag-source">
            /Users/ksen/Dropbox/jalangi2/src/js/runtime/analysisCallbackTemplate.js, line 286
        </div>
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        This callback is called before a property of an object is accessed.
    </div>
    

    
    
    
    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>iid</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>
            
            
            
            <td class="description last">
                
                Static unique instruction identifier of this callback</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>base</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>
            
            
            
            <td class="description last">
                
                Base object</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>offset</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type">*</span>


            
            </td>
            
            
            
            <td class="description last">
                
                Property</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>isComputed</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">boolean</span>


            
            </td>
            
            
            
            <td class="description last">
                
                True if property is accessed using square brackets.  For example,
<tt>isComputed</tt> is <tt>true</tt> if the get field operation is <tt>o[p]</tt>, and <tt>false</tt>
if the get field operation is <tt>o.p</tt></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>isOpAssign</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">boolean</span>


            
            </td>
            
            
            
            <td class="description last">
                
                True if the operation is of the form <code>o.p op= e</code></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>isMethodCall</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">boolean</span>


            
            </td>
            
            
            
            <td class="description last">
                
                True if the get field operation is part of a method call (e.g. <tt>o.p()</tt>)</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Object
                         | 
                    
                        undefined
                        
                    
            </td>
            <td class="description last">- If an object is returned and the <tt>skip</tt>
property of the object is true, then the get field operation is skipped.  Original <tt>base</tt> and
<tt>offset</tt> are replaced with that from the returned object if an object is returned.</td>
        </tr>
    
    </tbody>
</table>

    
    
    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="instrumentCode">
            
            instrumentCode<span class="signature">(iid, newCode, newAst)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Object|undefined}</span>
        </h4>
    
        
        <div class="tag-source">
            /Users/ksen/Dropbox/jalangi2/src/js/runtime/analysisCallbackTemplate.js, line 581
        </div>
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        This callback is called after a string passed as an argument to eval or Function is instrumented.
    </div>
    

    
    
    
    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>iid</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>
            
            
            
            <td class="description last">
                
                Static unique instruction identifier of this callback</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>newCode</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>
            
            
            
            <td class="description last">
                
                Instrumented code</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>newAst</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                The AST of the instrumented code</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Object
                         | 
                    
                        undefined
                        
                    
            </td>
            <td class="description last">- If an object is returned, the instrumented code is
replaced with the value stored in the <tt>result</tt> property of the object.</td>
        </tr>
    
    </tbody>
</table>

    
    
    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="instrumentCodePre">
            
            instrumentCodePre<span class="signature">(iid, code)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Object}</span>
        </h4>
    
        
        <div class="tag-source">
            /Users/ksen/Dropbox/jalangi2/src/js/runtime/analysisCallbackTemplate.js, line 568
        </div>
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        This callback is called before a string passed as an argument to eval or Function is instrumented.
    </div>
    

    
    
    
    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>iid</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>
            
            
            
            <td class="description last">
                
                Static unique instruction identifier of this callback</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>code</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>
            
            
            
            <td class="description last">
                
                Code that is going to get instrumented</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Object
                        
                    
            </td>
            <td class="description last">- If an object is returned and the
<tt>skip</tt> property is true, then the instrumentation of <tt>code</tt> is skipped.
Original <tt>code</tt> is replaced with that from the returned object if an object is returned.</td>
        </tr>
    
    </tbody>
</table>

    
    
    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="invokeFun">
            
            invokeFun<span class="signature">(iid, f, base, args, result, isConstructor, isMethod, functionIid)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Object|undefined}</span>
        </h4>
    
        
        <div class="tag-source">
            /Users/ksen/Dropbox/jalangi2/src/js/runtime/analysisCallbackTemplate.js, line 188
        </div>
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        This callback is called after a function, method, or constructor invocation.
    </div>
    

    
    
    
    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>iid</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>
            
            
            
            <td class="description last">
                
                Static unique instruction identifier of this callback</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>f</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
            
            <td class="description last">
                
                The function object that was invoked</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>base</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>
            
            
            
            <td class="description last">
                
                The receiver object for the function <tt>f</tt></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>args</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Array</span>


            
            </td>
            
            
            
            <td class="description last">
                
                The array of arguments passed to <tt>f</tt></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>result</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>
            
            
            
            <td class="description last">
                
                The value returned by the invocation</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>isConstructor</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">boolean</span>


            
            </td>
            
            
            
            <td class="description last">
                
                True if <tt>f</tt> is invoked as a constructor</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>isMethod</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">boolean</span>


            
            </td>
            
            
            
            <td class="description last">
                
                True if <tt>f</tt> is invoked as a method</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>functionIid</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>
            
            
            
            <td class="description last">
                
                The iid (i.e. the unique instruction identifier) passed to the callback
<a href="MyAnalysis.html#functionEnter">MyAnalysis#functionEnter</a> when the function f is executed.  <tt>functionIid</tt> can be treated as the
static identifier of the function <tt>f</tt>.  Note that a given function code block can create several function
objects, but each such object has a common <tt>functionIid</tt>, which is the iid that is passed to
<a href="MyAnalysis.html#functionEnter">MyAnalysis#functionEnter</a> when the function executes.</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Object
                         | 
                    
                        undefined
                        
                    
            </td>
            <td class="description last">- If an object is returned, the return value of the invoked function is
replaced with the value stored in the <tt>result</tt> property of the object.  This enables one to change the
value that is returned by the actual function invocation.</td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example</h5>
        

    
    <pre class="prettyprint"><code>x = y.f(a, b, c)

// the above call roughly gets instrumented as follows:

var skip = false;
var aret = analysis.invokeFunPre(113, f, y, [a, b, c], false, true);
if (aret) {
    f = aret.f;
    y = aret.y;
    args = aret.args;
    skip = aret.skip
}
if (!skip) {
    result =f.apply(y, args);
}
aret = analysis.invokeFun(117, f, y, args, result, false, true);
if (aret) {
    x = aret.result
} else {
    x = result;
}</code></pre>
    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="invokeFunPre">
            
            invokeFunPre<span class="signature">(iid, f, base, args, isConstructor, isMethod, functionIid)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Object|undefined}</span>
        </h4>
    
        
        <div class="tag-source">
            /Users/ksen/Dropbox/jalangi2/src/js/runtime/analysisCallbackTemplate.js, line 141
        </div>
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        This callback is called before a function, method, or constructor invocation.
Note that a method invocation also triggers a <a href="MyAnalysis.html#getFieldPre">MyAnalysis#getFieldPre</a> and a
<a href="MyAnalysis.html#getField">MyAnalysis#getField</a> callbacks.
    </div>
    

    
    
    
    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>iid</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>
            
            
            
            <td class="description last">
                
                Static unique instruction identifier of this callback</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>f</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
            
            <td class="description last">
                
                The function object that going to be invoked</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>base</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                The receiver object for the function <tt>f</tt></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>args</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Array</span>


            
            </td>
            
            
            
            <td class="description last">
                
                The array of arguments passed to <tt>f</tt></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>isConstructor</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">boolean</span>


            
            </td>
            
            
            
            <td class="description last">
                
                True if <tt>f</tt> is invoked as a constructor</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>isMethod</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">boolean</span>


            
            </td>
            
            
            
            <td class="description last">
                
                True if <tt>f</tt> is invoked as a method</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>functionIid</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>
            
            
            
            <td class="description last">
                
                The iid (i.e. the unique instruction identifier) passed to the callback
<a href="MyAnalysis.html#functionEnter">MyAnalysis#functionEnter</a> when the function <tt>f</tt> is executed.  The <tt>functionIid</tt> can be
treated as the static identifier of the function <tt>f</tt>.  Note that a given function code block can
create several function objects, but each such object has a common <tt>functionIid</tt>, which is the iid
that is passed to <a href="MyAnalysis.html#functionEnter">MyAnalysis#functionEnter</a> when the function executes.</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Object
                         | 
                    
                        undefined
                        
                    
            </td>
            <td class="description last">- If an object is returned and
the <tt>skip</tt> property of the object is true, then the invocation operation is skipped.
Original <tt>f</tt>, <tt>base</tt>, and <tt>args</tt> are replaced with that from the returned object if
an object is returned.</td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example</h5>
        

    
    <pre class="prettyprint"><code>y.f(a, b, c)

// the above call roughly gets instrumented as follows:

var skip = false;
var aret = analysis.invokeFunPre(113, f, y, [a, b, c], false, true);
if (aret) {
    f = aret.f;
    y = aret.y;
    args = aret.args;
    skip = aret.skip
}
if (!skip) {
    f.apply(y, args);
}</code></pre>
    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="literal">
            
            literal<span class="signature">(iid, val, hasGetterSetter)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Object|undefined}</span>
        </h4>
    
        
        <div class="tag-source">
            /Users/ksen/Dropbox/jalangi2/src/js/runtime/analysisCallbackTemplate.js, line 216
        </div>
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        This callback is called after the creation of a literal.  A literal can be a function literal, an object literal,
an array literal, a number, a string, a boolean, a regular expression, null, NaN, Infinity, or undefined.
    </div>
    

    
    
    
    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>iid</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>
            
            
            
            <td class="description last">
                
                Static unique instruction identifier of this callback</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>val</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>
            
            
            
            <td class="description last">
                
                The literal value</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>hasGetterSetter</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">boolean</span>


            
            </td>
            
            
            
            <td class="description last">
                
                True if the literal is an object and the object defines getters and setters</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Object
                         | 
                    
                        undefined
                        
                    
            </td>
            <td class="description last">- If the function returns an object, then the original literal value is
replaced with the value stored in the <tt>result</tt> property of the object.</td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example</h5>
        

    
    <pre class="prettyprint"><code>x = "Hello"

// the above call roughly gets instrumented as follows:

var result = "Hello";
var aret = analysis.literal(201, result, false);
if (aret) {
    result = aret.result;
}
x = result;</code></pre>
    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="onReady">
            
            onReady<span class="signature">(cb)</span>
        </h4>
    
        
        <div class="tag-source">
            /Users/ksen/Dropbox/jalangi2/src/js/runtime/analysisCallbackTemplate.js, line 632
        </div>
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        onReady is useful if your analysis is running on node.js (i.e., via the direct.js or jalangi.js commands)
and needs to complete some asynchronous initialization before the instrumented program starts.  In such a
case, once the initialization is complete, invoke the cb function to start execution of the instrumented
program.

Note that this callback is not useful in the browser, as Jalangi has no control over when the
instrumented program runs there.
    </div>
    

    
    
    
    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>cb</code></td>
            
            
            <td class="type">
            
            </td>
            
            
            
            <td class="description last">
                
                </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="putField">
            
            putField<span class="signature">(iid, base, offset, val, isComputed, isOpAssign)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Object|undefined}</span>
        </h4>
    
        
        <div class="tag-source">
            /Users/ksen/Dropbox/jalangi2/src/js/runtime/analysisCallbackTemplate.js, line 342
        </div>
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        This callback is called after a property of an object is written.
    </div>
    

    
    
    
    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>iid</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>
            
            
            
            <td class="description last">
                
                Static unique instruction identifier of this callback</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>base</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>
            
            
            
            <td class="description last">
                
                Base object</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>offset</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>
            
            
            
            <td class="description last">
                
                Property</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>val</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>
            
            
            
            <td class="description last">
                
                Value to be stored in <code>base[offset]</code></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>isComputed</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">boolean</span>


            
            </td>
            
            
            
            <td class="description last">
                
                True if property is accessed using square brackets.  For example,
<tt>isComputed</tt> is <tt>true</tt> if the get field operation is <tt>o[p]</tt>, and <tt>false</tt>
if the get field operation is <tt>o.p</tt></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>isOpAssign</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">boolean</span>


            
            </td>
            
            
            
            <td class="description last">
                
                True if the operation is of the form <code>o.p op= e</code></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Object
                         | 
                    
                        undefined
                        
                    
            </td>
            <td class="description last">-   If an object is returned, the result of the put field operation is
replaced with the value stored in the <tt>result</tt> property of the object.</td>
        </tr>
    
    </tbody>
</table>

    
    
    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="putFieldPre">
            
            putFieldPre<span class="signature">(iid, base, offset, val, isComputed, isOpAssign)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Object|undefined}</span>
        </h4>
    
        
        <div class="tag-source">
            /Users/ksen/Dropbox/jalangi2/src/js/runtime/analysisCallbackTemplate.js, line 324
        </div>
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        This callback is called before a property of an object is written.
    </div>
    

    
    
    
    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>iid</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>
            
            
            
            <td class="description last">
                
                Static unique instruction identifier of this callback</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>base</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>
            
            
            
            <td class="description last">
                
                Base object</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>offset</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>
            
            
            
            <td class="description last">
                
                Property</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>val</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>
            
            
            
            <td class="description last">
                
                Value to be stored in <code>base[offset]</code></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>isComputed</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">boolean</span>


            
            </td>
            
            
            
            <td class="description last">
                
                True if property is accessed using square brackets.  For example,
<tt>isComputed</tt> is <tt>true</tt> if the get field operation is <tt>o[p]</tt>, and <tt>false</tt>
if the get field operation is <tt>o.p</tt></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>isOpAssign</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">boolean</span>


            
            </td>
            
            
            
            <td class="description last">
                
                True if the operation is of the form <code>o.p op= e</code></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Object
                         | 
                    
                        undefined
                        
                    
            </td>
            <td class="description last">-  If an object is returned and the <tt>skip</tt>
property is true, then the put field operation is skipped.  Original <tt>base</tt>, <tt>offset</tt>, and
<tt>val</tt> are replaced with that from the returned object if an object is returned.</td>
        </tr>
    
    </tbody>
</table>

    
    
    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="read">
            
            read<span class="signature">(iid, name, val, isGlobal, isScriptLocal)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Object|undefined}</span>
        </h4>
    
        
        <div class="tag-source">
            /Users/ksen/Dropbox/jalangi2/src/js/runtime/analysisCallbackTemplate.js, line 357
        </div>
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        This callback is called after a variable is read.
    </div>
    

    
    
    
    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>iid</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>
            
            
            
            <td class="description last">
                
                Static unique instruction identifier of this callback</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>name</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>
            
            
            
            <td class="description last">
                
                Name of the variable being read</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>val</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>
            
            
            
            <td class="description last">
                
                Value read from the variable</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>isGlobal</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">boolean</span>


            
            </td>
            
            
            
            <td class="description last">
                
                True if the variable is not declared using <tt>var</tt> in the current script (e.g. <tt>console</tt>)</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>isScriptLocal</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">boolean</span>


            
            </td>
            
            
            
            <td class="description last">
                
                True if the variable is declared in the global scope using <tt>var</tt></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Object
                         | 
                    
                        undefined
                        
                    
            </td>
            <td class="description last">- If an object is returned, the result of the read operation is
replaced with the value stored in the <tt>result</tt> property of the object.</td>
        </tr>
    
    </tbody>
</table>

    
    
    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="runInstrumentedFunctionBody">
            
            runInstrumentedFunctionBody<span class="signature">(iid, f, functionIid)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{boolean}</span>
        </h4>
    
        
        <div class="tag-source">
            /Users/ksen/Dropbox/jalangi2/src/js/runtime/analysisCallbackTemplate.js, line 618
        </div>
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        This callback is called only when instrumented with J$.Config.ENABLE_SAMPLING = true
This callback is called before the body of a function, method, or constructor is executed
if returns true, instrumented function body is executed, else uninstrumented function body is executed
    </div>
    

    
    
    
    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>iid</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>
            
            
            
            <td class="description last">
                
                Static unique instruction identifier of this callback</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>f</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
            
            <td class="description last">
                
                The function whose body is being executed</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>functionIid</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>
            
            
            
            <td class="description last">
                
                The iid (i.e. the unique instruction identifier) passed to the callback
<a href="MyAnalysis.html#functionEnter">MyAnalysis#functionEnter</a> when the function <tt>f</tt> is executed.  The <tt>functionIid</tt> can be
treated as the static identifier of the function <tt>f</tt>.  Note that a given function code block can
create several function objects, but each such object has a common <tt>functionIid</tt>, which is the iid
that is passed to <a href="MyAnalysis.html#functionEnter">MyAnalysis#functionEnter</a> when the function executes.</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        boolean
                        
                    
            </td>
            <td class="description last">- If true is returned the instrumented function body is executed, otherwise the
uninstrumented function body is executed.</td>
        </tr>
    
    </tbody>
</table>

    
    
    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="scriptEnter">
            
            scriptEnter<span class="signature">(iid, instrumentedFileName, originalFileName)</span>
        </h4>
    
        
        <div class="tag-source">
            /Users/ksen/Dropbox/jalangi2/src/js/runtime/analysisCallbackTemplate.js, line 451
        </div>
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        This callback is called before the execution of a JavaScript file
    </div>
    

    
    
    
    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>iid</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>
            
            
            
            <td class="description last">
                
                Static unique instruction identifier of this callback</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>instrumentedFileName</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>
            
            
            
            <td class="description last">
                
                Name of the instrumented script file</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>originalFileName</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>
            
            
            
            <td class="description last">
                
                Name of the original script file</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="scriptExit">
            
            scriptExit<span class="signature">(iid, wrappedExceptionVal)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Object}</span>
        </h4>
    
        
        <div class="tag-source">
            /Users/ksen/Dropbox/jalangi2/src/js/runtime/analysisCallbackTemplate.js, line 468
        </div>
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        This callback is called when the execution of a JavaScript file completes
    </div>
    

    
    
    
    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>iid</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>
            
            
            
            <td class="description last">
                
                Static unique instruction identifier of this callback</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>wrappedExceptionVal</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>
|

<span class="param-type">undefined</span>


            
            </td>
            
            
            
            <td class="description last">
                
                If this parameter is an object, the script
execution has thrown an uncaught exception and the exception is being stored in the <tt>exception</tt>
property of the parameter</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Object
                        
                    
            </td>
            <td class="description last">- If an object is returned, then the
actual <tt>wrappedExceptionVal.exception</tt> is replaced with that from the
returned object. If an object is returned and the property <tt>isBacktrack</tt> is set, then the control-flow
returns to the beginning of the script body.  The property
<tt>isBacktrack</tt> can be set to <tt>true</tt> to repeatedly execute the script body as in MultiSE
symbolic execution.</td>
        </tr>
    
    </tbody>
</table>

    
    
    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="unary">
            
            unary<span class="signature">(iid, op, left, result)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Object|undefined}</span>
        </h4>
    
        
        <div class="tag-source">
            /Users/ksen/Dropbox/jalangi2/src/js/runtime/analysisCallbackTemplate.js, line 542
        </div>
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        This callback is called after a unary operation. Unary operations include  +, -, ~, !, typeof, void.
    </div>
    

    
    
    
    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>iid</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>
            
            
            
            <td class="description last">
                
                Static unique instruction identifier of this callback</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>op</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>
            
            
            
            <td class="description last">
                
                Operation to be performed</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>left</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>
            
            
            
            <td class="description last">
                
                Left operand</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>result</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>
            
            
            
            <td class="description last">
                
                The result of the unary operation</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Object
                         | 
                    
                        undefined
                        
                    
            </td>
            <td class="description last">- If an object is returned, the result of the unary operation is
replaced with the value stored in the <tt>result</tt> property of the object.</td>
        </tr>
    
    </tbody>
</table>

    
    
    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="unaryPre">
            
            unaryPre<span class="signature">(iid, op, left)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Object|undefined}</span>
        </h4>
    
        
        <div class="tag-source">
            /Users/ksen/Dropbox/jalangi2/src/js/runtime/analysisCallbackTemplate.js, line 527
        </div>
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        This callback is called before a unary operation. Unary operations include  +, -, ~, !, typeof, void.
    </div>
    

    
    
    
    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>iid</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>
            
            
            
            <td class="description last">
                
                Static unique instruction identifier of this callback</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>op</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>
            
            
            
            <td class="description last">
                
                Operation to be performed</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>left</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>
            
            
            
            <td class="description last">
                
                Left operand</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Object
                         | 
                    
                        undefined
                        
                    
            </td>
            <td class="description last">If an object is returned and the
<tt>skip</tt> property is true, then the unary operation is skipped.  Original <tt>op</tt> and <tt>left</tt>
are replaced with that from the returned object if an object is returned.</td>
        </tr>
    
    </tbody>
</table>

    
    
    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="write">
            
            write<span class="signature">(iid, name, val, lhs, isGlobal, isScriptLocal)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Object|undefined}</span>
        </h4>
    
        
        <div class="tag-source">
            /Users/ksen/Dropbox/jalangi2/src/js/runtime/analysisCallbackTemplate.js, line 373
        </div>
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        This callback is called before a variable is written.
    </div>
    

    
    
    
    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>iid</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>
            
            
            
            <td class="description last">
                
                Static unique instruction identifier of this callback</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>name</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>
            
            
            
            <td class="description last">
                
                Name of the variable being read</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>val</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>
            
            
            
            <td class="description last">
                
                Value to be written to the variable</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>lhs</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>
            
            
            
            <td class="description last">
                
                Value stored in the variable before the write operation</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>isGlobal</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">boolean</span>


            
            </td>
            
            
            
            <td class="description last">
                
                True if the variable is not declared using <tt>var</tt> in the current script (e.g. <tt>console</tt>)</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>isScriptLocal</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">boolean</span>


            
            </td>
            
            
            
            <td class="description last">
                
                True if the variable is declared in the global scope using <tt>var</tt></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Object
                         | 
                    
                        undefined
                        
                    
            </td>
            <td class="description last">- If an object is returned, the result of the write operation is
replaced with the value stored in the <tt>result</tt> property of the object.</td>
        </tr>
    
    </tbody>
</table>

    
    
    
</dd>

        </dl>
    
    
    
    
    
</article>

</section>  





        

        <footer>
            Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0</a> on Thu Jun 04 2015 14:31:59 GMT-0700 (PDT)
        </footer>
    </div>
</div>
<script>prettyPrint();</script>
<script src="scripts/linenumber.js"></script>
<script src="scripts/main.js"></script>
</body>
</html>
